package ltd.smallwang.client.task.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author justd
 * @description 功能描述
 * @since 2024-04-14 21:43
 **/
@Data
public class TaskAddCmd {

  @Size(min = 1, max = 20, message = "name length must be between 1 and 20")
  private String name;

  @Size(min = 1, max = 512, message = "description length must be between 1 and 100")
  private String description;

  /**
   * example: 2000-10-31T01:30:00.000-05:00
   */
  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private LocalDateTime startTime;

  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private LocalDateTime endTime;
}
